//验证手机号码
function checkMobile(numStr){ 
	var pattern = /^13[0-9]{1}[0-9]{8}$|14[0-9]{1}[0-9]{8}$|15[0-9]{1}[0-9]{8}$|18[0-9]{1}[0-9]{8}$|17[0-9]{1}[0-9]{8}$|189[0-9]{8}$/;
	flag = pattern.test(numStr);
	if(!flag){
		return false;
	}else{
		return true;
	}
}

//验证URL
function checkUrl(v){
	var strRegex = '^((https|http|ftp|rtsp|mms)?://)'
	+ '?(([0-9a-z_!~*\'().&=+$%-]+: )?[0-9a-z_!~*\'().&=+$%-]+@)?' //ftp的user@ 
	+ '(([0-9]{1,3}.){3}[0-9]{1,3}' // IP形式的URL- 199.194.52.184 
	+ '|' // 允许IP和DOMAIN（域名） 
	+ '([0-9a-z_!~*\'()-]+.)*' // 域名- www. 
	+ '([0-9a-z][0-9a-z-]{0,61})?[0-9a-z].' // 二级域名 
	+ '[a-z]{2,6})' // first level domain- .com or .museum 
	+ '(:[0-9]{1,4})?' // 端口- :80 
	+ '((/?)|' // a slash isn't required if there is no file name 
	+ '(/[0-9a-z_!~*\'().;?:@&=+$,%#-]+)+/?)$'; 
	var re = new RegExp(strRegex);
	if (re.test(v)) {
		return true;
	} else {
		return false;
	}
}

//验证邮箱
function checkEmail(v){
	var pattern = /^([a-zA-Z0-9_-])+(\.([a-zA-Z0-9_-])+)*@([a-zA-Z0-9_-])+(\.([a-zA-Z0-9_-])+)+$/;
	flag = pattern.test(v);
	if(flag){
		return true;
	}else{
		return false;
		}
}

function checkWordLong(v,min,max){	
	if(v.length>=min && v.length<=max){
		return true;
	}else{
		return false;
		}
}

function checkRepassword(v){
	if(v==$("#password").val()){
		return true;
	}else{
		return false;
		}
}